Connection draining (for CLB) and deregistration delay (for ALB/NLB) is a feature that allows the load balancer to stop sending new requests to a target that is deregistering or marked unhealthy, while still completing in-flight requests for a configurable timeout period [citation:6][citation:10].
Connection draining (for Classic Load Balancers) and deregistration delay (for Application and Network Load Balancers) is a feature that ensures a target is gracefully removed from service. When a target is marked for deregistration or becomes unhealthy, the load balancer immediately stops sending new requests to it. However, it continues to allow any in-flight requests that are already in progress to complete within a configurable timeout period. This prevents a hard cutover from interrupting active user sessions [citation:6][citation:10].
You're deploying a new version of a web service behind an ALB, and users report intermittent 502 errors during the rollout. What’s the first thing you check regarding the target group settings?
If you set the deregistration delay to 30 seconds but your app takes 45 seconds to finish processing active requests, what will happen to those requests?
How would you configure connection draining on an EC2 Auto Scaling group to avoid dropping user sessions during scale-in events?
Our team noticed a spike in 504 errors every time we deploy — the load balancer is configured with 60s deregistration delay, but our app logs show requests are still being processed after 90s. What could be going wrong, and how would you debug it?
We’re rolling out a new feature that handles long-running file uploads. The backend takes up to 2 minutes to process them. How do you adjust connection draining without breaking other services with shorter timeouts?
A developer disabled connection draining to speed up deployments. Now customers are losing cart data during scale-in events. How do you explain the tradeoff and convince them to re-enable it?
You’re designing a high-throughput API that handles 10K+ concurrent long-lived WebSocket connections. How would you architect connection draining to avoid connection storms during rolling updates without increasing latency or cost?
Your service runs on EC2 with Application Load Balancer and Auto Scaling. During a regional outage, you need to drain traffic from one AZ while preserving session state. What’s your strategy for coordinating deregistration delay with health check thresholds and client retry logic?
You inherited a legacy system where connection draining is misconfigured — the delay is 5s but backend workers take 30s to finish tasks. How do you remediate this without causing downtime or customer impact?
We’re migrating from Classic Load Balancer to Network Load Balancer across 200+ microservices. NLBs don’t support connection draining the same way — how do you design a cross-team migration plan that avoids increased error rates during deployments?
Our platform supports global users with regional ALBs and DNS-based failover. How do you coordinate deregistration delay, health checks, and client-side timeouts across regions to ensure seamless failover during maintenance without violating SLOs?
You’re designing a multi-tenant SaaS platform where tenants have SLAs for request completion. How do you enforce connection draining policies at scale across heterogeneous services, and how do you measure compliance over time?